package test_3_8;

public class four {
    public static void main(String[] args) {
        int arr[]={1,2,3,4,5,6,7,8,9};
        double c=avg(arr);
        System.out.println(c);
    }
    public static double avg(int arr[])
    {
        int sum=0;
        for(int i=0;i<arr.length;i++)
        {
            sum+=arr[i];
        }
        double avg=sum/arr.length*1.0;
        return avg;
    }
}
